//
//  peopleModel.m
//  YaoHeAPP
//
//  Created by xyh on 16/3/9.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "peopleModel.h"

@implementation peopleModel
-(id)initWith:(NSDictionary*)dic
{
    self=[super init];
    
    if (self) {
        self.COMPANY_ID=dic[@"COMPANY_ID"];
        self.LOGO_PATH=dic[@"LOGO_PATH"];
        self.PURCHASE_NUM=dic[@"PURCHASE_NUM"];
        self.REG_MOBILE=dic[@"REG_MOBILE"];
        self.REG_NAME=dic[@"REG_NAME"];
        self.REG_TYPE=dic[@"REG_TYPE"];
        self.SERVICE_SCORE=dic[@"SERVICE_SCORE"];
        self.USER_ID=dic[@"USER_ID"];
        
    }
    return self;
}


//用此方法可以防止服务器更换数据程序崩掉
-(NSString*)forKey:(NSString*)key inDictionary:(NSDictionary*)dic
{
    NSString*string;
    if ([[dic allKeys]containsObject:key]) {
        string=dic[key];
    }
    else{
        string=@"";
    }
    return string;
}

-(NSString*)withDic:(NSDictionary*)dic Key:(NSString*)key
{
    NSString*string;
    if ([[dic allKeys]containsObject:key]) {
        string=dic[key];
    }
    else{
        string=@"";
    }
    return string;
}


@end
